3.2669 \(\int x^m (a+b x^n) \, dx\)

Optimal. Leaf size=27 \[ \frac{a x^{m+1}}{m+1}+\frac{b x^{m+n+1}}{m+n+1} \]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(1 + m + n))/(1 + m + n)

________________________________________________________________________________________

Rubi [A]  time = 0.0079004, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ \frac{a x^{m+1}}{m+1}+\frac{b x^{m+n+1}}{m+n+1} \]

Antiderivative was successfully verified.

[In]

Int[x^m*(a + b*x^n),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(1 + m + n))/(1 + m + n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int x^m \left (a+b x^n\right ) \, dx &=\int \left (a x^m+b x^{m+n}\right ) \, dx\\ &=\frac{a x^{1+m}}{1+m}+\frac{b x^{1+m+n}}{1+m+n}\\ \end{align*}

Mathematica [A]  time = 0.0189485, size = 27, normalized size = 1. \[ \frac{a x^{m+1}}{m+1}+\frac{b x^{m+n+1}}{m+n+1} \]

Antiderivative was successfully verified.

[In]

Integrate[x^m*(a + b*x^n),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(1 + m + n))/(1 + m + n)

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 34, normalized size = 1.3 \begin{align*}{\frac{ax{{\rm e}^{m\ln \left ( x \right ) }}}{1+m}}+{\frac{bx{{\rm e}^{m\ln \left ( x \right ) }}{{\rm e}^{n\ln \left ( x \right ) }}}{m+n+1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(a+b*x^n),x)

[Out]

a/(1+m)*x*exp(m*ln(x))+b/(m+n+1)*x*exp(m*ln(x))*exp(n*ln(x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.06185, size = 101, normalized size = 3.74 \begin{align*} \frac{{\left (b m + b\right )} x x^{m} x^{n} +{\left (a m + a n + a\right )} x x^{m}}{m^{2} +{\left (m + 1\right )} n + 2 \, m + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="fricas")

[Out]

((b*m + b)*x*x^m*x^n + (a*m + a*n + a)*x*x^m)/(m^2 + (m + 1)*n + 2*m + 1)

________________________________________________________________________________________

Sympy [A]  time = 3.78093, size = 175, normalized size = 6.48 \begin{align*} \begin{cases} \left (a + b\right ) \log{\left (x \right )} & \text{for}\: m = -1 \wedge n = 0 \\a \log{\left (x \right )} + \frac{b x^{n}}{n} & \text{for}\: m = -1 \\\frac{a m x x^{m}}{m^{2} + m} + \frac{b m^{2} \log{\left (x \right )}}{m^{2} + m} + \frac{b m \log{\left (x \right )}}{m^{2} + m} & \text{for}\: n = - m - 1 \\\frac{a m x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac{a n x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac{a x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac{b m x x^{m} x^{n}}{m^{2} + m n + 2 m + n + 1} + \frac{b x x^{m} x^{n}}{m^{2} + m n + 2 m + n + 1} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(a+b*x**n),x)

[Out]

Piecewise(((a + b)*log(x), Eq(m, -1) & Eq(n, 0)), (a*log(x) + b*x**n/n, Eq(m, -1)), (a*m*x*x**m/(m**2 + m) + b
*m**2*log(x)/(m**2 + m) + b*m*log(x)/(m**2 + m), Eq(n, -m - 1)), (a*m*x*x**m/(m**2 + m*n + 2*m + n + 1) + a*n*
x*x**m/(m**2 + m*n + 2*m + n + 1) + a*x*x**m/(m**2 + m*n + 2*m + n + 1) + b*m*x*x**m*x**n/(m**2 + m*n + 2*m +
n + 1) + b*x*x**m*x**n/(m**2 + m*n + 2*m + n + 1), True))

________________________________________________________________________________________

Giac [B]  time = 1.11245, size = 74, normalized size = 2.74 \begin{align*} \frac{b m x x^{m} x^{n} + a m x x^{m} + a n x x^{m} + b x x^{m} x^{n} + a x x^{m}}{m^{2} + m n + 2 \, m + n + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="giac")

[Out]

(b*m*x*x^m*x^n + a*m*x*x^m + a*n*x*x^m + b*x*x^m*x^n + a*x*x^m)/(m^2 + m*n + 2*m + n + 1)